package com.neusoft.neumooc.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.neusoft.core.common.BaseService;
import com.neusoft.core.common.exception.ServiceException;
import com.neusoft.neumooc.VO.GoodsKindVO;
import com.neusoft.neumooc.VO.GoodsVO;
import com.neusoft.neumooc.dao.GoodsDao;

@Service
@Transactional
public class GoodsServiceImpl extends BaseService implements GoodsService {
	@Autowired
	GoodsDao goodsDao;

	@Override
	public int queryGoodsKindCount() throws ServiceException {
		return goodsDao.queryGoodsKindCount();
	}

	@Override
	public List<GoodsKindVO> getGoodsKind(int pageNo, int pageSize)
			throws ServiceException {
		return goodsDao.getGoodsKind(pageNo, pageSize);
	}

	@Override
	public List<GoodsVO> getGoodsList(String kindId, int pageIndex, int pageSize)
			throws ServiceException {
		return goodsDao.getGoodsList(kindId, pageIndex, pageSize);
	}

	@Override
	public int getGoodsCount(String kindId) throws ServiceException {
		return goodsDao.getGoodsCount(kindId);
	}

}
